package org.jeecg.modules.accyentry.entity;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;

import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @Description:  配件出入库
 * @Author: jerryzhu
 * @Date:   2021-11-15
 * @Version: V1.0
 */
@Data
@TableName("accessory_entry")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="accessory_entry对象", description=" 配件出入库")
public class AccessoryEntry implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private java.lang.String id;
	
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private java.lang.String createBy;
    
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private java.util.Date createTime;
	
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private java.lang.String updateBy;
    
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private java.util.Date updateTime;
	
	/**所属部门*/
    @ApiModelProperty(value = "所属部门")
    private java.lang.String sysOrgCode;
    
	/**类型*/
	@Excel(name = "类型", width = 15, dicCode = "accessory_action_type")
	@Dict(dicCode = "accessory_action_type")
    @ApiModelProperty(value = "操作类型")
    private java.lang.Integer accessoryActionType;
	
	@ApiModelProperty(value = "操作流水号")
    private java.lang.String sn;
	
	/**配件编号*/
	@Excel(name = "配件编号", width = 15)
    @ApiModelProperty(value = "配件编号")
    private java.lang.String codeNum;
	
	/**名称*/
	@Excel(name = "名称", width = 15)
    @ApiModelProperty(value = "名称")
    private java.lang.String name;
	
	/**规格*/
    @ApiModelProperty(value = "规格")
    private java.lang.String style;
    
	/**类别*/
    @Excel(name = "类别", width = 15, dictTable = "accessory_category", dicText = "cate_name", dicCode = "id")
	@Dict(dictTable = "accessory_category", dicText = "cate_name", dicCode = "id")
    @ApiModelProperty(value = "类别")
    private java.lang.String cateId;
    
    /**最低库存*/
    @ApiModelProperty(value = "最低库存")
    private java.lang.Integer minStock;
    
    /**计重方式*/
    @ApiModelProperty(value = "计重方式")
    @Dict(dicCode = "count_weight_pattern")
    private java.lang.String countWeightPattern;
    
    /**单位*/
    @ApiModelProperty(value = "单位")
    private java.lang.String per;
    
    /**数量*/
    @ApiModelProperty(value = "数量")
    private java.lang.Integer count;
    
    /**重量(g)*/
    @ApiModelProperty(value = "重量(g)")
    private java.math.BigDecimal weight;

    /**单价(￥)*/
    @ApiModelProperty(value = "单价(￥)")
    private java.math.BigDecimal price;
    
    /**工费(￥)*/
    @ApiModelProperty(value = "工费(￥)")
    private java.math.BigDecimal laborCost;
    
    /**价值单价(￥)*/
    @ApiModelProperty(value = "价值单价(￥)")
    private java.math.BigDecimal unitPrice;
    
    /**价值金额(￥)*/
    @ApiModelProperty(value = "价值金额(￥)")
    private java.math.BigDecimal costAmount;
    
    /**实付金额(￥)*/
    @ApiModelProperty(value = "实付金额(￥)")
    private java.math.BigDecimal payAmount;
    
    /**计价方式*/
    @Excel(name = "计价方式", width = 15, dicCode = "count_price_pattern")
    @ApiModelProperty(value = "计价方式")
    @Dict(dicCode = "count_price_pattern")
    private java.lang.String countPricePattern;
    
    /**计价日期*/
    @ApiModelProperty(value = "计价日期")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private java.util.Date priceDate;
    
    /**成色*/
	@Excel(name = "成色", width = 15, dictTable = "gold_karat", dicText = "gold_karat_name", dicCode = "id")
	@Dict(dictTable = "gold_karat", dicText = "gold_karat_name", dicCode = "id")
    @ApiModelProperty(value = "成色")
    private java.lang.String karat;
	
	/**颜色*/
    @ApiModelProperty(value = "颜色")
    @Dict(dicCode = "color")
    private java.lang.String color;
	
	/**属性*/
    @ApiModelProperty(value = "属性")
    private java.lang.String attribute;
    
    /**形状*/
    @ApiModelProperty(value = "形状")
    @Dict(dicCode = "shape")
    private java.lang.String shape;
    
    /**长度*/
    @ApiModelProperty(value = "长度")
    private java.lang.String len;
    
    /**来源*/
    @ApiModelProperty(value = "来源")
    private java.lang.String comeFrom;
    
    /**是否客来*/
    @ApiModelProperty(value = "是否客来")
    @Dict(dicCode = "yn")
    private java.lang.String isFromCus;
    
    /**备注*/
    @ApiModelProperty(value = "备注")
    private java.lang.String remark;
    
    /**图片*/
    private byte[] image;
    
	/**图片*/
	@Excel(name = "图片", width = 15)
    private transient java.lang.String imageString;

    public byte[] getImage(){
        if(imageString==null){
            return null;
        }
        try {
            return imageString.getBytes("UTF-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return null;
    }

    public String getImageString(){
        if(image==null || image.length==0){
            return "";
        }
        try {
            return new String(image,"UTF-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return "";
    }
    
    /**工单号*/
	@Excel(name = "工单号", width = 15)
    @ApiModelProperty(value = "工单号")
    private java.lang.String workNum;
	
    @ApiModelProperty(value = "拆分页")
    private java.lang.String pn;
    
	/**款号*/
	@Excel(name = "款号", width = 15)
    @ApiModelProperty(value = "款号")
    private java.lang.String styleCodeNum;
	
	/**客户ID*/
	@Excel(name = "客户ID", width = 15)
    @ApiModelProperty(value = "客户ID")
    private java.lang.String customerInfoId;
	
	/**发出员工*/
	@Excel(name = "发出员工", width = 15)
    @ApiModelProperty(value = "发出员工")
    private java.lang.String sendPerson;
	
	/**发出仓库*/
	@Excel(name = "发出仓库", width = 15)
    @ApiModelProperty(value = "发出仓库")
    private java.lang.String sendStorage;
	
	/**发出客户*/
	@Excel(name = "发出客户", width = 15)
    @ApiModelProperty(value = "发出客户")
    private java.lang.String sendCustomer;
	
	/**发出时间*/
	@Excel(name = "发出时间", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "发出时间")
    private java.util.Date sendTime;
	
	/**接收员工*/
	@Excel(name = "接收员工", width = 15)
    @ApiModelProperty(value = "接收员工")
    private java.lang.String receivePerson;
	
	/**接收仓库*/
	@Excel(name = "接收仓库", width = 15)
    @ApiModelProperty(value = "接收仓库")
    private java.lang.String receiveStorage;
	
	/**接收客户*/
	@Excel(name = "接收客户", width = 15)
    @ApiModelProperty(value = "接收客户")
    private java.lang.String receiveCustomer;
	
	/**接收时间*/
	@Excel(name = "接收时间", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "接收时间")
    private java.util.Date receiveTime;
	
	/**状态*/
	@Excel(name = "状态", width = 15, dicCode = "del_flag")
    @ApiModelProperty(value = "状态")	
    @Dict(dicCode = "del_flag")
    private java.lang.String isDel;
	
	//发出方（仅用于列表显示，不作数据库字段）
	private transient String senderName;
	
	//接收方（仅用于列表显示，不作数据库字段）
	private transient String receiverName;
}
